package com.flying.enumeration;

import java.util.Arrays;

/**
 * @author 刘鹏飞
 * @ClassName TestEnum
 * @Date 2024/12/22 21:08
 * @Created by 刘鹏飞
 * @Description
 */
public class TestEnum {

    public static void main(String[] args) {

        System.out.println(Festivals.SPRING_FESTIVAL);
        System.out.println(Festivals.SPRING_FESTIVAL.getName());

        System.out.println(Arrays.toString(Festivals.values()));

        // 返回枚举类中的指定对象
        Festivals DOUBLE_NINTH_FESTIVAL = Festivals.valueOf("DOUBLE_NINTH_FESTIVAL");
        System.out.println(DOUBLE_NINTH_FESTIVAL==Festivals.DOUBLE_NINTH_FESTIVAL);

    }
}
